//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopUserAddress, MinishopUserAddressResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopUserAddressList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopUserAddressResponse>(`/uctoo/minishop_user_address/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopUserAddress = async (id: string) => {
  return requestClient.get<MinishopUserAddress>(`/uctoo/minishop_user_address/${id}`);
};

export const adductooMinishopUserAddress = async (data: Partial<MinishopUserAddress>) => {
  return requestClient.post<MinishopUserAddress>('/uctoo/minishop_user_address/add', data);
};

export const edituctooMinishopUserAddress = async (data: Partial<MinishopUserAddress>) => {
  return requestClient.post<MinishopUserAddress>('/uctoo/minishop_user_address/edit', data);
};

export const deleteuctooMinishopUserAddress = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_user_address/del', { id });
};
